package com.lq.ecoldchain.ui.mine.carInfo.typelist

import com.lq.ecoldchain.base.CommonLoadingViewModel
import org.kodein.di.Kodein
import org.kodein.di.android.support.AndroidLifecycleScope
import org.kodein.di.generic.bind
import org.kodein.di.generic.instance
import org.kodein.di.generic.scoped
import org.kodein.di.generic.singleton

/*
*2018/12/28 0028  14:22
*function by lq
*/
val carTypeKodeinModule  = Kodein.Module("Car_Type_Kodein_Module"){
    bind<CarTypeViewModel>() with scoped(AndroidLifecycleScope).singleton {
        CarTypeViewModel()
    }
    bind<CarTypeDelegate>() with scoped(AndroidLifecycleScope).singleton {
        CarTypeDelegate(
                viewModel =  instance(),
                loadingViewModel = CommonLoadingViewModel.instance(context)
        )
    }
}